<!DOCTYPE html>
<html>
<style>
    .control-label{
        padding: 6px 0px;
    }
    .group-block{
        margin-top: 5px !important;
        margin-bottom: 5px !important;
    }
</style>



<head>
    <title>金融产品</title>
		<#include "/header.html">
</head>

<body>
<div id="rrapp" v-cloak>

    <div v-show="showList" style="border: 1px dashed #E5E5E5;display: inline-block">
            <form class="form-inline">
                <div class="col-sm-12 form-group group-block">
                    <label  class="col-sm-2 control-label">首页基础配置</label>
                </div>
                <div class="col-sm-12 form-group group-block">
                    <label  class="col-sm-2 control-label">宣传语:</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" style="width: 60%" v-model="baseLoan.slogan" placeholder="请输入该栏目在首页的宣传语,不超过30字"/>
                    </div>
                </div>

                <div class="col-sm-12 form-group group-block">
                    <label  class="col-sm-2 control-label">类型管理:</label>
                    <div class="col-sm-10">
                        <input type="text" style="width: 100%" id="baseLoanType"  data-role="tagsinput" />
                    </div>
                </div>

                <div class="col-sm-12 form-group group-block">
                    <label  class="col-sm-2 control-label">栏目宣传图:</label>
                    <div class="col-sm-10">
                        <input type="file" name="file" class="layui-upload-file">
                        <a v-show="baseShow" v-bind:href="baseUrl" target="_blank">点击查看原图</a>
                    </div>
                </div>

                <div class="col-sm-12 form-group group-block">
                    <label  class="col-sm-2 control-label"></label>
                    <div class="col-sm-10">
                        <a  class="btn btn-primary" @click="baseSaveOrUpdate"><i class="fa fa-plus"></i>&nbsp;保存</a>
                    </div>
                </div>
            </form>

    </div>




    <div v-show="showList" style="border: 1px dashed #E5E5E5;">
        <div class="grid-btn">
            <div class="row" style="border: 0px;padding: 0px;">
            <label  class="col-sm-12 control-label">产品配置</label>
            </div>
            <form class="form-inline">
                <div class="col-sm-2 form-group group-block">
                    <label  class="col-sm-4 control-label">产品名称:</label>
                    <div class="col-sm-8">
                        <input type="text" v-model="q.productName" class="form-control" placeholder="产品名称">
                    </div>
                </div>
                <div class="col-sm-2 form-group group-block">
                    <label  class="col-sm-4 control-label">类型管理:</label>
                    <div class="col-sm-8">
                       <select class="form-control" v-model="q.type">
                           <option value="">请选择</option>
                           <option v-for="option in types" :value="option">{{option}}</option>
                       </select>
                    </div>
                </div>
                <div class="col-sm-2 form-group group-block">
                    <label  class="col-sm-4 control-label">状态:</label>
                    <div class="col-sm-8">
                        <select class="form-control" v-model="q.status">
                            <option value="">请选择</option>
                            <option v-for="option in switchJson" :value="option.code">{{option.name}}</option>
                        </select>
                    </div>
                </div>
                <div>
                    <#if shiro.hasPermission("business:loan:list")>
                        <a class="btn btn-default" @click="query"><i class="fa fa-plus"></i>&nbsp;查询</a>
                    </#if>
                    <#if shiro.hasPermission("business:loan:save")>
                        <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                    </#if>
                </div>
            </form>



        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>



    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-2 control-label">所属类型</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="tFinanceProduct.type">
                                <option v-for="option in types" :value="option">{{option}}</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">产品名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tFinanceProduct.productName" placeholder="产品名称"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">展示方式</div>
                        <div class="col-sm-10">
                            <input type="radio" name="radios" value="0" checked />统一页面
                            <input type="radio" name="radios" value="1" /> 第三方页面
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">产品图片</div>
                        <div class="col-sm-10">
                            <input type="file" name="file" class="layui-upload-file loanImage">
                            <a v-show="loanImageShow" v-bind:href="loanUrl" target="_blank">点击查看原图</a>
                        </div>
                    </div>

                        <div class="form-group" v-show="thirdShow">
                            <div class="col-sm-2 control-label">页面地址</div>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" v-model="tFinanceProduct.link" placeholder="链接地址"/>
                            </div>
                        </div>


                    <div class="form-group" v-show="localShow">
                        <div class="col-sm-2 control-label">产品描述</div>
                        <div class="col-sm-10">
                          <textarea cols="50" rows="5" v-model="tFinanceProduct.productDesc" placeholder="不超过100个字"></textarea>
                        </div>
                    </div>

                    <div class="form-group" v-show="localShow">
                        <div class="col-sm-2 control-label">产品详情</div>
                        <div class="col-sm-10">
                            <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
                        </div>
                    </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" v-show="isNoLook" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="clear" value="返回"/>
            </div>
        </form>
    </div>
</div>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>
<script src="${request.contextPath}/statics/js/modules/business/loan.js?_${.now?long}"></script>
</body>
</html>